home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / ici / ici.cpi / re.h < prev    next >
C/C++ Source or Header  |  1994-10-27  |  1KB  |  49 lines

  1. #ifndef    ICI_RE_H
  2. #define    ICI_RE_H
  3.  
  4. /*
  5.  * Definitions etc. for regexp(3) routines.
  6.  *
  7.  * Caveat:  this is V8 regexp(3) [actually, a reimplementation thereof],
  8.  * not the System V one.
  9.  */
  10. #define NSUBEXP  10
  11. typedef struct regexp {
  12.     char *startp[NSUBEXP];
  13.     char *endp[NSUBEXP];
  14.     char regstart;        /* Internal use only. */
  15.     char reganch;        /* Internal use only. */
  16.     char *regmust;        /* Internal use only. */
  17.     int regmlen;        /* Internal use only. */
  18.     int size;        /* Internal use only. */
  19.     char program[1];    /* Unwarranted chumminess with compiler. */
  20. } regexp;
  21.  
  22. #if __STDC__ == 1
  23. regexp *regcomp(char *);
  24. int regexec(regexp *, char *);
  25. void regsub(regexp *, char *, char *);
  26. void regerror(char *);
  27. #else
  28. extern regexp *regcomp();
  29. extern int regexec();
  30. extern void regsub();
  31. extern void regerror();
  32. #endif
  33.  
  34. #ifndef    ICI_OBJECT_H
  35. #include "object.h"
  36. #endif
  37.  
  38. struct regexpo
  39. {
  40.     object_t    o_head;
  41.     regexp    *r_re;
  42. };
  43. #define    regexpof(o)    ((regexp_t *)(o))
  44. #define    isregexp(o)    ((o)->o_tcode == TC_REGEXP)
  45.  
  46. extern int *re_nbra;
  47.  
  48. #endif
  49.